package com.itheima.job;

import com.itheima.service.OrderSettingService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author ChenYong
 * @data 2021/3/27 16:35
 */
@Component
@JobHandler("clear.oss.data")
public class ClearOssDataJob extends IJobHandler {
    @Resource
    private OrderSettingService orderSettingService;

    @Override
    public ReturnT<String> execute(String s) throws Exception {
        System.out.println("clear oss job...");
        orderSettingService.clearOssData();
        return SUCCESS;
    }
}
